﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// NhomTuoi Repository. Good example of CRUD operations.
    ///// </summary>
    public class NhomTuoiRepository : INhomTuoiRepository
    {
        private static readonly INhomTuoiDao _nhomTuoi = DataAccess.NhomTuoiDao;
        public List<NhomTuoi> GetList()
        {
            return _nhomTuoi.GetNhomTuoi().ToList();
        }

        public NhomTuoi Get(string id)
        {
            return _nhomTuoi.GetNhomTuoiByID(id);
        }

        public void Insert(NhomTuoi t)
        {
            _nhomTuoi.InsertNhomTuoi(t);
        }

        public void Update(NhomTuoi t)
        {
            _nhomTuoi.UpdateNhomTuoi(t);
        }

        public void Delete(NhomTuoi t)
        {
            _nhomTuoi.DeleteNhomTuoi(t);
        }
    }
}